- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
Notion - properties updates to Create Page from Data Source #18452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| WalkthroughAdds dynamic property fetching to the Notion "Create Page from Data Source" action: introduces a new  Changes
 Sequence Diagram(s)sequenceDiagram
  autonumber
  actor User
  participant UI as Action UI
  participant Action as create-page-from-database
  participant Notion as Notion API
  User->>UI: Select Parent Data Source
  UI-->>Action: trigger reloadProps (parentDataSource)
  Action->>Notion: fetch database properties
  Notion-->>Action: return properties metadata
  User->>UI: Select propertyTypes
  UI-->>Action: trigger reloadProps (propertyTypes)
  Action->>Action: additionalProps() -> pick(selected propertyTypes)
  Action-->>UI: buildAdditionalProps() -> dynamic Properties fields
  User->>UI: Fill Properties and run action
  UI->>Action: execute create-page
  Action->>Notion: create page with selected properties
  Notion-->>Action: creation result
  Action-->>UI: show result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
 Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
 ✅ Passed checks (3 passed)
 ✨ Finishing touches
 🧪 Generate unit tests
 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
 📒 Files selected for processing (1)
 ✅ Files skipped from review due to trivial changes (1)
 ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment  | 
| The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️  Outside diff range comments (1)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)
109-111: Replaceparent.data_source_idwithparent.database_id. Notion’s pages.create API requiresparent.database_idfor database parents; usingdata_source_idwill return a 400.- parent: { data_source_id: this.parentDataSource }, + parent: { database_id: this.parentDataSource },(components/notion/actions/create-page-from-database/create-page-from-database.mjs:109)
🧹 Nitpick comments (2)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (2)
5-5: Optional: import without extension for consistency.Using extensionless subpath imports is the common pattern in this repo.
Apply this diff:
-import pick from "lodash-es/pick.js"; +import pick from "lodash-es/pick";
31-42: Fix typo and clarify properties description
Update the description in components/notion/actions/create-page-from-database/create-page-from-database.mjs:- description: "Select one or more page properties. Willl override properties set in the `Properties` prop below.", + description: "Select one or more page properties. If none are selected, all properties will be exposed. This overrides the `Properties` prop below.",ParentType remains
"data_source"—consistent with all other Notion components.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (2)
- components/notion/actions/create-page-from-database/create-page-from-database.mjs(3 hunks)
- components/notion/package.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)
components/notion/actions/update-page/update-page.mjs (2)
selectedProperties(64-64)
properties(89-89)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/notion/package.json (1)
3-3: Version bump aligns with action changes. LGTM.components/notion/actions/create-page-from-database/create-page-from-database.mjs (2)
12-12: Action version bump looks correct.
23-23: Good: reloadProps on parent data source.
        
          
                components/notion/actions/create-page-from-database/create-page-from-database.mjs
          
            Show resolved
            Hide resolved
        
      | /approve | 
    
      
        1 similar comment
      
    
  
    | /approve | 
Resolves #18447
Summary by CodeRabbit